
import { Base } from '../utils/base.js';

class Admin extends Base {
    constructor() {
        super();
    }

    // 总记录
    getAdminRank(callBack) {
        var params = {
            url: 'admin-rank',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }

    // 各门店销售额
    getUserMoneyList(data,callBack) {
        var params = {
            data: data,
            url: 'admin-rank/user-money',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }

    // 根据门店查询各个店员的销售额
    getUserMoneyListOne(data, callBack) {
        var params = {
            data: data,
            url: 'admin-rank/user-money-list',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }

    // 查询门店关联订单数量
    getOrderNumByStore(data, callBack) {
        var params = {
            data: data,
            url: 'admin-rank/order-num',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }

    // 根据门店查询订单列表
    getOrderListByStore(data, callBack) {
        var params = {
            data: data,
            url: 'admin-rank/order-list',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }
    // 下单数量
    getProductOrderList(data, callBack) {
        var params = {
            data: data,
            url: 'admin-rank/product',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }
    // 订单详情
    getProductOrder(data, callBack) {
        var params = {
            data: data,
            url: 'admin-rank/product-order',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }

    // 新客数
    getNewUserList(data, callBack) {
        var params = {
            data: data,
            url: 'admin-rank/new-user',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }

    // 新客数订单
    getNewUserOrderList(data, callBack) {
        var params = {
            data: data,
            url: 'admin-rank/new-user-order',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }

    getTeamUserList(data, callBack) {
        var params = {
            data: data,
            url: 'admin-rank/team-user',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }

    getTeamList(data, callBack) {
        var params = {
            data: data,
            url: 'admin-rank/team',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }
    // 员工销售量
    getStoreUserList(data, callBack) {
        var params = {
            data: data,
            url: 'admin-rank/store-user',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }

    // 订单列表
    getStoreUserOrder(data, callBack) {
        var params = {
            data: data,
            url: 'admin-rank/store-user-order',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }

    // 根据门店获取员工列表
    getStoreUserByStore(data, callBack) {
        var params = {
            url: 'admin-rank/store/store-user',
            data: data,
            type: 'GET',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }

    // 根据销售额查询明细
    getOrderListByStoreUser(data, callBack) {
        var params = {
            url: 'admin-rank/store/order',
            data: data,
            type: 'GET',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }

    // 查询裂变数
    getFission(data, callBack) {
        var params = {
            url: 'admin-rank/fission',
            data: data,
            type: 'GET',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }

    // 查询裂变数
    getFissionByOrder(data, callBack) {
        var params = {
            url: 'admin-rank/fission-order',
            data: data,
            type: 'GET',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }

    // 门店提现情况
    getWithdrawalByStore(data, callBack) {
        var params = {
            url: 'admin-rank/withdrawal',
            data: data,
            type: 'GET',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }

    // 门店提现详情
    getWithdrawalByMoney(data, callBack) {
        var params = {
            url: 'admin-rank/withdrawal-money',
            data: data,
            type: 'GET',
            sCallBack: function (res) {
                callBack && callBack(res);
            }
        }
        this.request(params);
    }
}

export { Admin };
